package com.learn.sc.consul.producer.consulproducer.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
public class HelloController {

	@Value("${hello.string}")
	private String helloString;
	
	@RequestMapping("/hello")
	public String hello() {
		log.info("hello");
		return helloString;
	}
	
	@RequestMapping("/feighex")
	public String feighExample(@RequestParam String name) {
		log.info("feigh-hello");
		return "hello "+name+"，this is feign messge, 22";
	}
}
